Documentation > CMS Template API Library > AssetPath > Item[Int32]
Item[Int32]
Allows the user to access the pieces of the path like it were an array of strings.
Type
System.String
Parameters
| Name | Description | Type |
|---|---|---|
| index | System.String |
Code Example
C#
Sample:
Asset asset = Asset.Load("/Site/Folder/Asset");
Out.WriteLine(asset.AssetPath[0]);
// prints "Site"
Out.WriteLine(asset.AssetPath[1]);
// prints "Folder"
Out.WriteLine(asset.AssetPath[2]);
// prints "Asset"